<template>
  <div
    class="flex text-sm text-blue align-center margin-left"
    style="float: left; height:100%;width: 50%;"
  >
    <div class="flex-sub text-cut">
      <span>客户经理：{{ salesUser }}</span>
    </div>
    <div class="flex-sub text-cut">
      <span>TEL：{{ salesPhone }}</span>
    </div>
    <div class="flex-sub text-cut">
      <span>QQ：{{ salesQQ }}</span>
    </div>
    <div class="flex-sub text-cut">
      <span>客服经理：{{ customerUser }}</span>
    </div>
    <div class="flex-sub text-cut">
      <span>TEL：{{ customerPhone }}</span>
    </div>
    <div class="flex-sub text-cut">
      <span>QQ：{{ customerQQ }}</span>
    </div>
    <div class="text-cut ">
      <a href="http://www.tofba.com" target="_blank">官网</a>
    </div>
    <div class="margin-left text-orange">
      <a href="https://csp.ces-group.cn/#/register" target="_blank">金融服务</a>
    </div>
    <div class="margin-left text-green">
      <a href="http://oms.tofba.com/" target="_blank">九方海外仓</a>
    </div>
  </div>
</template>

<script>
import { getCustomerSalesmanService } from '@/api/myProfile'
export default {
  data() {
    return {
      salesUser: '',
      salesPhone: '',
      salesQQ: '',
      customerUser: '',
      customerPhone: '',
      customerQQ: ''
    }
  },
  mounted() {
    this.init()
  },
  methods: {
    async init() {
      const data = await getCustomerSalesmanService({})
      // this.userMap = this.publicData.userAll
      if (
        data.salesmanUser &&
        data.salesmanUser !== null &&
        data.customerServiceUser &&
        data.customerServiceUser !== null
      ) {
        this.salesUser = data.salesmanUser.name
        this.salesPhone = data.salesmanUser.phone
        this.salesQQ = data.salesmanUser.qq

        this.customerUser = data.customerServiceUser.name
        this.customerPhone = data.customerServiceUser.phone
        this.customerQQ = data.customerServiceUser.qq

        this.showInfo = true
      }
    }
  }
}
</script>

<style scoped>
.text-orange a:hover {
  color: #f37b1d;
  text-decoration: none;
}
</style>
